<template>
  <el-button @click="goodsWarehouseSelectIn.open()">
    {{ bodyData.name }}
  </el-button>

  <GoodsWarehouseSelectIn ref="goodsWarehouseSelectIn" @select="select" />
</template>

<script lang="ts" setup>
import { ref, defineExpose, defineEmits } from "vue";
import $kt from "@/vueKantboot";
import { ElMessage, ElMessageBox } from "element-plus";
import GoodsWarehouseSelectIn from "@/components/goodsWarehouseSelectOne/goodsWarehouseSelectIn.vue";

let goodsWarehouseSelectIn = ref();

let bodyData = ref({
  name: "未选择仓库",
  id: null,
});

let emits = defineEmits(["select"]);

let select = (res: any) => {
  bodyData.value = res;
  emits("select", bodyData.value);
};
</script>

<style lang="scss" scoped>
.box {
  padding: 20px 20px 0 20px;
}

.box-box {
  background-color: #fff;
  color: #fff;
  text-align: center;
  padding: 30px;
  border-radius: 5px;
}

.box-box:hover {
  // 变小
  transform: scale(0.95);
}

.box-box:active {
  // 变小
  transform: scale(0.9);
}
</style>
